External depth map transformation method for conversion of two-dimensional images to stereoscopic images

ABSTRACT

External depth map transformation method for conversion of two-dimensional images to stereoscopic images that provides increased artistic and technical flexibility and rapid conversion of movies for stereoscopic viewing. Embodiments of the invention convert a large set of highly granular depth information inherent in a depth map associated with a two-dimensional image to a smaller set of rotated planes associated with masked areas in the image. This enables the planes to be manipulated independently or as part of a group and eliminates many problems associated with importing external depth maps including minimization of errors that frequently exist in external depth maps.

BACKGROUND OF THE INVENTION

1. Field of the Invention

One or more embodiments of the invention are related to the image processing. More particularly, but not by way of limitation, one or more embodiments of the invention enable an external depth map transformation method for conversion of two-dimensional images to stereoscopic images that provides increased artistic and technical flexibility and rapid conversion of movies for stereoscopic viewing. Embodiments of the invention convert a large set of highly granular depth information inherent in a depth map associated with a two-dimensional image to a smaller set of rotated planes associated with masked areas in the image. This enables the planes to be manipulated independently or as part of a group, and eliminates many problems associated with importing external depth maps including minimization of errors that frequently exist in external depth maps.

2. Description of the Related Art

Two-dimensional images contain no depth information and hence appear the same to an observer's left and right eye. Two-dimensional images include paper photographs or images displayed on a standard computer monitor. Two-dimensional images however may include shading and lighting that provide the observer a sense of depth for portions of the image, however, this is not considered a three-dimensional view of an image. Three-dimensional images on the other hand include image information that differs for each eye of the observer. Three-dimensional images may be displayed in an encoded format and projected onto a two-dimensional display. This enables three-dimensional or stereoscopic viewing for example with anaglyph glasses or polarized glasses. Other displays may provide different information based on the orientation with respect to the display, e.g., autostereoscopic displays that do not require special glasses for viewing three-dimensional images on a flat two-dimensional display. An example of such as display is a lenticular display. Alternatively, two images that are shown alternately to the left and right eyes may be viewed with shutter glasses. Regardless of the type of technology involved, conversion of two-dimensional images to stereoscopic images requires the addition of depth information to the two-dimensional input image.

Current solutions for conversion of two-dimensional images to stereoscopic images fall into two broad categories.

The first category involves systems that convert two-dimensional images into three-dimensional images wherein the two-dimensional images have no associated depth maps or other depth information. Systems in this category may be automated to provide depth information based on colors or areas of the picture, but these systems have had limited success. Other systems in this category require large amounts of manual labor for highly accurate results. These manual masking systems generally operate by accepting manually created masks in order to define areas or regions in the image that have different depths and which generally represent different human observable objects. Depth information is then accepted by the system as input from artists for example, which results in nearer objects being shifted relatively further horizontally to produce left and right eye viewpoints or images, or Red/Blue anaglyph single image encodings, either of which may be utilized for stereoscopic viewing. By shifting objects in the foreground, hidden or background information may be exposed. If the missing image data is not shown in any other images in a scene, then the “gap” must be filled with some type of image data to cover the artifact. If the hidden image data does not exist in any other image in a scene, then this prohibits borrowing of pixels from the areas in other images that do contain the missing information. Various algorithms exist for filling gaps, which are also known as occlusion filling algorithms, to minimize the missing information with varying success. Generally, the depth artist gains visual clues from the image and applies depth to masks using artistic input.

The main problems with this first category of conversion are time of conversion based on the large amount of manual labor and the expense of the conversion process.

The second category involves systems that convert two-dimensional images that have associated depth maps or other depth information, into three-dimensional images. The depth information may be obtained by the system from an external “time of flight” system, where light from a laser for example is sent towards the subject and timed to determine the distance after the light reflects back from the subject. The depth information may also be obtained by the system from a “triangulation” system, which determines the angles to a subject, for example from two sensors that are a known distance away from one another. Another apparatus that may obtain depth is a light-field or plenoptic camera having multiple lenses. A recent development has been the three camera system that includes a high resolution camera and two lower resolution side cameras or “witness cameras” mounted next to the high resolution camera. A depth map may be calculated from the disparity between the two side camera images and applied to the image obtained from the high-resolution camera to generate stereoscopic images. Any missing information may be filled with image data from the side cameras to minimize artifacts such as missing or hidden information, even if not at the same resolution. Another advantage of the trifocal system is the elimination of heavy and expensive stereo camera systems that have two large and optically identical and perfectly aligned lenses.

However, there are many problems that occur when using an externally generated depth map to a Z-depth. This includes any depth map created from a disparity map that is generated from a stereoscopic pair of images, for example captured with a two-lens stereo-camera or with the witness cameras of the trifocal system. One of the main problems is that depth maps provided by external systems are noisy, may include inaccurate edges, spikes and spurious values, all of which are common with Z-depths generated from external systems. Another problem is that since the depth maps correspond either on a pixel-by-pixel basis or at least generally fairly high resolution with the associated two-dimensional image, manipulating depth on this fine granularity is extremely difficult and time consuming. These types of systems are generally directed at automatically converting video or movies for stereoscopic viewing for example without masking objects and with the labor associated therewith. Artifacts on edges of objects are common in some systems limiting their overall automation capabilities.

For at least the limitations described above there is a need for a method for an external depth map transformation method for conversion of two-dimensional images to stereoscopic images.

BRIEF SUMMARY OF THE INVENTION

One or more embodiments described in the specification are related to an external depth map transformation method for conversion of two-dimensional images to stereoscopic images that provides increased artistic and technical flexibility and rapid conversion of movies for stereoscopic viewing. Embodiments of the invention convert a large set of highly granular depth information inherent in a depth map associated with a two-dimensional image to a smaller set of rotated planes associated with masked areas in the image. This enables the planes to be manipulated independently or as part of a group and eliminates many problems associated with importing external depth maps including minimization of errors that frequently exist in external depth maps

Embodiments of the invention may utilize any type of depth map including Z-Depth associated with images that are generated through rendering from a Computer Generated Imagery or CGI application such as MAYA® or HOUDINI®, depth maps obtained after conversion of a disparity map from a stereoscopic pair of images to a Z-Depth, Z-Depth extraction from of a light-field image, time-of-flight imaging systems, LIDAR, or any other type of depth map associated with a two-dimensional image.

Embodiments of the invention include a number of inherent advantages over simply using the Z-Depths as is currently performed in automated or semi-automated 2D to 3D conversion processes.

For example, embodiments of the invention transform the large set of depth map depths or Z-Depth into a manageable number of parts. Thus, the system enables an artist to manipulate individual or groups of parts for artistic purposes, as opposed to pixel-by-pixel editing. So, for example, an artist may independently adjust the angle, and hence depth of a robot's arm so the resulting stereoscopic image appears to reach out of the screen.

In addition, by transforming the Z-Depth into a manageable number of parts, the system enables an artist to group these parts and apply separate RGB image layers to these groups. This enables more efficient occlusion filling in the 2D to 3D conversion workflow.

Furthermore, embodiments of the invention mold depth data to eliminate depth errors by transforming large numbers of depth values to smaller number of plane rotations. In one embodiment, the system may calculate the normal and position for a specific region, for example to form an average, rotation value associated with a plane that represents a large group of depth values, some of which may be erroneous. Hence, issues associated with imperfect depth map data are often averaged out, or otherwise eliminated. In some extreme cases of noisy depth data, these issues may not be fully resolved, however, embodiments of the invention reduce the problem to a manageable number of editable parts, and enable the issues to be rapidly and easily corrected automatically or by accepting inputs from an artist. One or more embodiments of the invention may utilize a normal vector algorithm. Other algorithms may be utilized alone or in combination with the normal vector method to achieve similar or advantageous results. For example, embodiments of the invention may treat each pixel as a point in space, e.g., wherein X and Y represent the position of the pixel and Z represents the Z-Depth value of that pixel, and isolate only the points within the defined region, and calculate the “best-fit” plane for that group of points, and/or a normal vector representation of the plane. The normal vector in this embodiment is orthogonal to the plane and may be encoded into separate RGB channels in order to provide a viewable representation of the planar angles with respect to the optical display. Embodiments of the invention may utilize any type of plane fitting algorithm including, but not limited to, regression plane, orthogonal distance regression plane, etc. Embodiments of the invention may utilize any type of filtering as part of the transformation processing including but not limited to dilation and erosion.

One or more embodiments of the invention implement a method on a computer for example wherein the method includes obtaining an external depth map associated with a two-dimensional image, obtaining at least one mask associated with at least one area within the two-dimensional image, calculating a fit or best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask, applying depth associated with the plane having the fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.

Embodiments of the method may also include obtaining of the external depth map associated with a two-dimensional image by obtaining a disparity map, or a depth map of lower resolution than the two-dimensional image from a pair of witness cameras, or a depth map from time-of-flight system, or a depth map from a triangulation system.

Embodiments of the invention may also include obtaining at least one mask associated with at least one area within the two-dimensional image by automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range, or automatically generating the at least one mask comprising the at least one area wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold, or both methods of size, depth range and boundary or any combination thereof.

Embodiments of the invention may also include calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask by calculating a normal vector for the plane, or a regression fit for the plane, or an orthogonal distance regression fit for the plane, or in any other known manner regarding fitting a plane to particulars points in three-dimensional space.

Embodiments of the invention generally also include applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.

Embodiments may also include grouping two or more of the planes in order to provide a piecewise masked surface area. The grouping may include a link of a predefined minimum and maximum distance, which enables moving one plane to move other grouped planes if the maximum values are hit. The minimum values may be zero or negative to allow to precise joining of planes or slight overlap for example. In one or more embodiments, the grouping may include a link having a spring constant, this enables the movement of planes relative to one another to self align with respect to the other planes to minimize the overall spring force on three or more of the corner points of the plane. Alternatively or in combination, embodiments of the invention may include altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of the plane with another plane. This enables a plane to be positioned in three-dimensional space, rotated in three-dimensions, reshaped by moving a corner point, warped in effect by adding depth or a curve to the plane, for example to add depth to the plane itself to match the underlying image data. Embodiments of the invention may also include accepting an input to alter any combination of position, orientation, shape, depth or curve of the plane, for example to artistically fit the underlying image data, correct errors or artifacts from the automated fitting process for touch up, etc.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of the invention will be more apparent from the following more particular description thereof, presented in conjunction with the following drawings wherein:

FIG. 1 illustrates an exemplary overall system architecture for one or more embodiments of the invention.

FIG. 2 illustrates a flow chart for an embodiment of the method of the invention.

FIG. 3 illustrates an example two-dimensional input image.

FIG. 4 illustrates an example set of masks applied to areas or regions of the two-dimensional input image.

FIG. 5A illustrates a perfect error free input depth map associated with the two-dimensional image. FIG. 5B illustrates a typical depth map having erroneous depth data as acquired from or calculated from an external depth capture apparatus or system.

FIG. 6A illustrates a perfect normal map showing colors associated with angles of the surface of pixels within the two-dimensional image of FIG. 5A. FIG. 6B illustrates an imperfect normal map associated with erroneous depth data as acquired from or calculated from an external depth capture apparatus or system as shown in FIG. 5B.

FIGS. 7A-C illustrates a perspective, side and top view of perfect error-free depth applied to the two-dimensional input image. FIGS. 7D-F illustrates a perspective, side and top view of imperfect typical depth having errors and acquired from an external depth capture apparatus or system and applied to the two-dimensional input image.

FIGS. 8A-C illustrates a perspective, side and top view of perfect error-free depth applied to planes and/or masks of areas or regions associated with the two-dimensional input image. FIGS. 8D-F illustrates a perspective, side and top view of imperfect typical depth acquired from an external depth capture apparatus or system and applied to planes and/or masks of areas or regions associated with to the two-dimensional input image.

FIG. 9A illustrates a close-up view of the imperfect typical transformed into rotated planes which may or may not be flat planes, or curved planes or surfaces and which yield a manageable set of information that enables correction of the errors automatically by the system or through manual artist input accepted and processed by the system. FIG. 9B illustrates a close-up view of a portion of FIG. 9B showing plane grouping with or without minimum and maximum connections and with or without spring attachments having a spring constant for example.

DETAILED DESCRIPTION OF THE INVENTION

An external depth map transformation method for conversion of two-dimensional images to stereoscopic images will now be described. In the following exemplary description numerous specific details are set forth in order to provide a more thorough understanding of embodiments of the invention. It will be apparent, however, to an artisan of ordinary skill that embodiments of the invention may be practiced without incorporating all aspects of the specific details described herein. In other instances, specific features, quantities, or measurements well known to those of ordinary skill in the art have not been described in detail so as not to obscure the invention. Readers should note that although examples of the invention are set forth herein, the claims, and the full scope of any equivalents, are what define the metes and bounds of the invention.

FIG. 1 illustrates an exemplary overall system architecture for one or more embodiments of the invention. As shown, camera 101 and associated external depth capture apparatus 102, e.g., a single apparatus such as a light-field or time-of-flight apparatus, or as shown with two side mounted witness cameras for example, are utilized to capture images and depth values associated with foreground object 150, background object 151 in scene 152. Generally, multiple images are captured at fixed points in time to obtain a movie. Other embodiments may utilize depth captured from or input via other systems not directly coupled with camera 101, including computer generated depths associated with computer-animated characters or objects, external LIDAR, plenoptic camera or any other external depth capture apparatus for example. Embodiments of the system generally include a computer such as server 110 that enables artist(s) 160 to apply and/or correct depth for example as obtained from the external depth capture apparatus 102 or any other external source of depth. Embodiments of the server are generally utilized to obtain masks associated with areas within the foreground object 150, background object 151 or elsewhere in the scene 152. The masks may be automatically generated or accepted by the server for example by artist 160. The server may automatically calculate a fit for planes or masks associated with areas of the images or accept inputs to alter the fit from artist 160 for example. The system may optionally also automatically alter the position, orientation, shape, depth or curve of planes or masks to fit the edges of the planes or masks with other planes or masks for example. Embodiments apply the depth of the planes or masks to the areas in the image to produce a stereoscopic image, e.g., anaglyph, or stereoscopic image pair for display on visual output 120 by viewer 170.

FIG. 2 illustrates a flow chart for an embodiment of the method of the invention wherein the method includes obtaining an external depth map associated with a two-dimensional image at 201, obtaining at least one mask associated with at least one area within the two-dimensional image at 202, calculating a fit or best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask at 203, optionally, embodiments of the method may also automatically alter the position, orientation, shape, depth or curve of planes or masks to fit the edges of the planes or masks with other planes or masks for example at 204, applying depth associated with the plane having the fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair at 205. One or more embodiments thus enable an external depth map transformation method for conversion of two-dimensional images to stereoscopic images that provides increased artistic and technical flexibility and rapid conversion of movies for stereoscopic viewing. Embodiments of the invention convert a large set of highly granular depth information inherent in a depth map associated with a two-dimensional image to a smaller set of rotated planes associated with masked areas in the image. This enables the planes to be manipulated independently or as part of a group and eliminates many problems associated with importing external depth maps including minimization of errors that frequently exist in external depth maps.

FIG. 3 illustrates an example two-dimensional input image. As shown, foreground object 150, here a CGI human torso and background object 151, here a box form a scene in two-dimensional space with no depth information encoded into the image.

FIG. 4 illustrates an example set of masks applied to areas or regions of the two-dimensional input image. As shown, masks 401 and 402 are utilized to represent sides of the box 151 a with flat planes, while masks 403, 404, 405, 406 are utilized to represent portions of the human torso with flat and/or curved planes, namely the front of the pectoral area, stomach area, front inner shoulder area, and front bicep area of the human torso. The other box in the background, box 151 b is also shown with masks that are covered by foreground object, e.g., the human torso. Embodiments of the invention may also include obtaining at least one mask associated with at least one area within the two-dimensional image by automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range, or automatically generating the at least one mask comprising the at least one area wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold, or both methods of size, depth range and boundary or any combination thereof. As shown masks representing flat planes 401 and 402 may be obtained by determining that they are over N pixels by M pixels and have within a K to L range in orthogonal vector value. The test regions for generating masks may be iterated through the image and enlarged to fit the underlying area if the depth data is within the K to L range for example. Masks 403-406 may be curved or faceted or flat to represent the shape of any underlying portion that is within a predefined size and/or vector range for example. Any algorithm for detecting object types and assigning predefined mask groups to represent the underlying two-dimensional image are in keeping with the spirit of the invention.

FIG. 5A illustrates a perfect error free input depth map associated with the two-dimensional image. As shown, darker luminance values are encoded as nearer to the observer, although the reverse encoding may be utilized. There is no requirement that the depth map has to be in a viewable format, however, this encoding may enable intuitive viewing of depth errors for example. If all depth maps were error free, then embodiments of the invention may still be utilized to alter depth associated with the two-dimensional image in a manageable manner. However, since most depth maps are not perfect, embodiments of the invention enable error minimization and manageability unknown in the art.

FIG. 5B illustrates a typical depth map having erroneous depth data 501 as acquired from or calculated from an external depth capture apparatus or system. This problem makes some external depth maps nearly unusable for automated depth conversion, however, embodiments of the system enable use of error prone depth maps in a manageable manner.

Embodiments of the method may also include obtaining of the external depth map associated with a two-dimensional image by obtaining a disparity map, or a depth map of lower resolution than the two-dimensional image from a pair of witness cameras, or a depth map from time-of-flight system, or a depth map from a triangulation system. Embodiments of the invention may also include obtaining any type of depth map at 201 including Z-Depth associated with images that are generated through rendering from a Computer Generated Imagery or CGI application such as MAYA® or HOUDINI® as shown for example in FIG. 5A, depth maps obtained after conversion of a disparity map from a stereoscopic pair of images to a Z-Depth for example as shown in FIG. 5B, Z-Depth extraction from of a light-field image, time-of-flight imaging systems, LIDAR, or any other type of depth map associated with a two-dimensional image.

Embodiments of the invention include a number of inherent advantages over simply using the Z-Depths as is currently performed in automated or semi-automated 2D to 3D conversion processes.

For example, embodiments of the invention transform the large set of depth map depths or Z-Depth into a manageable number of parts. Thus, the system enables artist 160 to manipulate individual or groups of parts for artistic purposes, as opposed to pixel-by-pixel editing. So, for example, the artist may independently adjust the angle, and hence depth of a robot's arm so the resulting stereoscopic image appears to reach out of the screen. In one or more embodiments, the planes may be grouped and movement or reshaping of a plane in two or three dimensions may move or reshape other grouped or otherwise coupled planes.

In addition, by transforming the Z-Depth into a manageable number of parts, the system enables an artist to group these parts and apply separate RGB image layers to these groups. This enables more efficient occlusion filling in the 2D to 3D conversion workflow.

FIG. 6A illustrates a perfect normal map showing colors associated with angles of the surface of pixels within the two-dimensional image of FIG. 5A. For example by encoding separate RGB channels with X, Y and Z information related to the vector orthogonal to the particular area, a viewable format for normal vectors is thus obtained. If X increases from left to right, and Red is utilized as the X vector channel, then areas pointing to the right for example have a higher red value. If Y increases in the vertical direction and if Green is utilized for the Y channel, the areas having an orthogonal vector pointing have a higher green value. Any other encoding for visually viewable normal vector formats is in keeping with the spirit of the invention.

FIG. 6B illustrates an imperfect normal map associated with erroneous depth data as acquired from or calculated from an external depth capture apparatus or system as shown in FIG. 5B. This image shows the severe problems with error prone depth data showing error area 501 indicating an area that is pointing upward, when it is really not (see FIG. 6A for error free portion of image).

FIGS. 7A-C illustrate a perspective, side and top view of perfect error-free depth applied to the two-dimensional input image. If depth is error free, then the foreground object may be viewed with depth without errors in the foreground object, however, depending on the depth capture system, missing background data may exist and cause artifacts if there are not other images in a scene that have the missing background information. This occurs for example if the foreground object does not move with respect to the background during the scene.

FIGS. 7D-F illustrate a perspective, side and top view of imperfect typical depth having errors and acquired from an external depth capture apparatus or system and applied to the two-dimensional input image. As shown, portions of the torso stretch outward when they should not, errors in the left box 151 are shown as well with a curved flat surface near the top. The errors in the depth shown as applied in FIGS. 7D-F are difficult to fix by an artist since the errors occur on a small granular level, for example pixel or sub-pixel and require tedious paint style operations to correct. In addition, altering a depth of a visible area such as the arm is also quite difficult and economically unfeasible since the operations occur at the pixel level and not associated with a mask or masks that represents the arm for example.

FIGS. 8A-C illustrate a perspective, side and top view of perfect error-free depth applied to planes and/or masks of areas or regions associated with the two-dimensional input image. If error free depth maps are obtained by the system, then applying the masks of FIG. 4 results after calculation of plane rotations for example results in a readily editable image.

FIGS. 8D-F illustrate a perspective, side and top view of imperfect typical depth acquired from an external depth capture apparatus or system and applied to planes and/or masks of areas or regions associated with to the two-dimensional input image. As shown, many of the errors of shown in FIGS. 7D-F are entirely or nearly entirely eliminated which enables rapid adjustment of depth of correction of depth errors if at all depending on the quality requirements of the particular project. For example, through calculation of best fit planes (whether flat or curved) at 203 as detailed above with respect to FIG. 2, many of the errors are minimized or otherwise averaged away.

Whether using a perfect depth map that is error free or not, embodiments of the invention may also include calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask by calculating a normal vector for the plane, or a regression fit for the plane, or an orthogonal distance regression fit for the plane, or in any other known manner regarding fitting a plane to particulars points in three-dimensional space. Specifically, embodiments of the invention mold depth data to eliminate depth errors by transforming large numbers of depth values to smaller number of plane rotations. In one embodiment, the system may calculate the normal and position for a specific region, for example to form an average, rotation value associated with a plane that represents a large group of depth values, some of which may be erroneous. Hence, issues associated with imperfect depth map data are often averaged out, or otherwise eliminated. In some extreme cases of noisy depth data, these issues may not be fully resolved, however, embodiments of the invention reduce the problem to a manageable number of editable parts, and enable the issues to be rapidly and easily corrected automatically or by accepting inputs from an artist. Although embodiments of the invention may utilize a normal vector approach, other algorithms may be utilized alone or in combination to achieve similar or advantageous results. For example, embodiments of the invention may treat each pixel as a point in space, e.g., wherein X and Y represent the position of the pixel and Z represents the Z-Depth value of that pixel, and isolate only the points within the defined region, and calculate the “best-fit” plane for that group of points. Embodiments of the invention may utilize any type of plane fitting algorithm including but not limited to regression plane, orthogonal distance regression plane, etc. Commonly available statistics toolboxes include orthogonal regression using principal components analysis for example that may be utilized as off the shelf software components for calculation of best fitting planes to a number of points for example to minimize the perpendicular distances from each of the points to a plane. Embodiments of the invention may utilize any type of filtering as part of the transformation processing including but not limited to dilation and erosion. In one or more embodiments, an algorithm that iterates over a set of depth slopes and averages the slopes over an area for example is one example of an algorithm that may be utilized to calculate the normal vector for a particular area of the depth map.

FIG. 9A illustrates a close-up view of the imperfect typical transformed into rotated planes which may or may not be flat planes, or curved planes or surfaces and which yield a manageable set of information that enables correction of the errors automatically by the system or through manual artist input accepted and processed by the system. As shown, even with a high degree of erroneous depth data, the masks are low in number, and thus are far easier to adjust to correct depth associated with the two-dimensional image.

FIG. 9B illustrates a close-up view of a portion of FIG. 9B showing plane grouping with or without minimum and maximum connections and with or without spring attachments having a spring constant for example. In one or more embodiments, plane grouping may be visibly shown and editable to enable grouped planes to be repositioned by accepting a drag or other user input wherein the couplings 902 and 903 thus pull or otherwise drag or reposition attached planes. Any algorithm such as an iterative algorithm for moving attached planes with minimum and maximum coupling distances or spring constants is in keeping with the spirit of the invention. One such method iterates over each coupling after accepting a user move and moves each attached plane. If a coupling is maximized then the grouped planes move as well. If the couplings have a spring constant F=k*x, then a force may be imparted on the other planes, which may have masses associated with them for example based on size to visually show non-rigid coupling moves of multiple grouped planes.

Alternatively or in combination, embodiments of the invention may include altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of the plane with another plane. This enables a plane to be positioned in three-dimensional space, rotated in three-dimensions, reshaped by moving a corner point, warped in effect by adding depth or a curve to the plane, for example to add depth to the plane itself to match the underlying image data. Embodiments of the invention may also include accepting an input to alter any combination of position, orientation, shape, depth or curve of the plane, for example to artistically fit the underlying image data, correct errors or artifacts from the automated fitting process for touch up, etc.

Embodiments of the invention generally also include applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair. Any type of output that is capable of providing different left and right eye information is in keeping with the spirit of the invention.

While the invention herein disclosed has been described by means of specific embodiments and applications thereof, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope of the invention set forth in the claims. 

What is claimed is:
 1. An external depth map transformation method for conversion of two-dimensional images to stereoscopic images comprising: obtaining an external depth map associated with a two-dimensional image; obtaining at least one mask associated with at least one area within the two-dimensional image; calculating a best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask; and, applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.
 2. The method of claim 1 wherein the obtaining of the external depth map associated with a two-dimensional image comprises obtaining a disparity map.
 3. The method of claim 1 wherein the obtaining of the external depth map associated with a two-dimensional image comprises obtaining a depth map of lower resolution than the two-dimensional image from a pair of witness cameras.
 4. The method of claim 1 wherein the obtaining of the external depth map associated with a two-dimensional image comprises obtaining a depth map from time-of-flight or light-field system.
 5. The method of claim 1 wherein the obtaining of the external depth map associated with a two-dimensional image comprises obtaining a depth map from a triangulation system.
 6. The method of claim 1 wherein the obtaining at least one mask associated with at least one area within the two-dimensional image comprises automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range.
 7. The method of claim 1 wherein the obtaining at least one mask associated with at least one area within the two-dimensional image comprises automatically generating the at least one mask comprising the at least one area wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold.
 8. The method of claim 1 wherein the calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask comprises calculating a normal vector for the plane.
 9. The method of claim 1 wherein the calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask comprises calculating a regression fit for the plane.
 10. The method of claim 1 wherein the calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask comprises calculating an orthogonal distance regression fit for the plane.
 11. The method of claim 1 wherein applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.
 12. The method of claim 1 grouping two or more of said plane.
 13. The method of claim 1 grouping two or more of said plane wherein each of said two or more plane are grouped with a link of a predefined minimum and maximum distance.
 14. The method of claim 1 grouping two or more of said plane wherein each of said two or more plane are grouped with a link having a spring constant.
 15. The method of claim 1 altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of said plane with another plane.
 16. The method of claim 1 accepting an input to alter any combination of position, orientation, shape, depth or curve of said plane.
 17. An external depth map transformation method for conversion of two-dimensional images to stereoscopic images comprising: obtaining an external depth map associated with a two-dimensional image; obtaining at least one mask associated with at least one area within the two-dimensional image by automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range or wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold or wherein the at least one area is over the predefined size and within the predefined depth range and comprises the boundary having the difference in luminance values over the predefined threshold; calculating a best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask; and, applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.
 18. The method of claim 1 wherein the obtaining of the external depth map associated with a two-dimensional image comprises obtaining a disparity map, or obtaining a depth map of lower resolution than the two-dimensional image from a pair of witness cameras, or obtaining a depth map from time-of-flight system, or obtaining a depth map from a triangulation system.
 19. The method of claim 1 wherein the calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask comprises calculating a normal vector for the plane, or a regression fit for the plane, or an orthogonal distance regression fit for the plane.
 20. An external depth map transformation method for conversion of two-dimensional images to stereoscopic images comprising: obtaining an external depth map associated with a two-dimensional image; obtaining at least one mask associated with at least one area within the two-dimensional image by automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range or wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold or wherein the at least one area is over the predefined size and within the predefined depth range and comprises the boundary having the difference in luminance values over the predefined threshold; calculating a best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask; altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of said plane with another plane; and, applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair. 